/** 
 * @Company: 北京慧点科技有限公司 | www.smartdot.com.cn
 * @Copyright 1998-2022 © Smartdot Technologies Co., Ltd.
 */
package com.hd.rcugrc.project.leaveapplication.annualleave.service.impl;

import com.hd.rcugrc.bpm.facade.mobile.mvc.query.ListQueryResult;
import com.hd.rcugrc.project.leaveapplication.annualleave.bean.OaOfficeAnnualLeaveBean;
import com.hd.rcugrc.security.user.Group;
import com.hd.rcugrc.security.user.User;
import com.hd.rcugrc.security.user.UserInfoService;
import com.hd.rcugrc.web.ws.Expression;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.hd.wep.extend.common.service.impl.WeBaseServiceImpl;
import com.hd.rcugrc.project.leaveapplication.annualleave.dao.OaOfficeAnnualLeaveDao;
import com.hd.rcugrc.project.leaveapplication.annualleave.entity.OaOfficeAnnualLeaveEntity;
import com.hd.rcugrc.project.leaveapplication.annualleave.service.OaOfficeAnnualLeaveService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.persistence.Query;
import java.util.ArrayList;
import java.util.List;

/**
 * 年假维护 - Service实现类 - 由代码生成器生成
 * 
 * @class: OaOfficeAnnualLeaveServiceImpl
 * @date 2024-07-26 16:12:53
 * @author smartdot
 * @version 1.0 - 2024-07-26 16:12:53
 * @see
 */
public class OaOfficeAnnualLeaveServiceImpl extends WeBaseServiceImpl<OaOfficeAnnualLeaveDao, OaOfficeAnnualLeaveEntity>
        implements OaOfficeAnnualLeaveService {
    
    protected Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private UserInfoService userInfoService;
    // 查询指定用户的年假
    @Autowired
    private OaOfficeAnnualLeaveDao oaOfficeAnnualLeaveDao;
    @Override
    public ListQueryResult findListByUser(String account) {
        List<OaOfficeAnnualLeaveEntity> list = oaOfficeAnnualLeaveDao.findAllByCreatorAccount(account);
        ListQueryResult listQueryResult = new ListQueryResult();
        listQueryResult.setData(list.toArray());
        listQueryResult.setTotalSize(list.size());
        return listQueryResult;
    }
    
}
